import pop from '../utils/pop';
import env from '../config/env';

const ticket = localStorage.ticket;
const prefix = env.gwApiPrefix;
const errorHandler = error => {
	pop.error("加载数据失败！");
	console.log(error);
}

export default {
	addResume(params) {
		return axios.post(`${prefix}/api/zsapi/resume/add?ticket=${ticket}`, params).catch(res => {
			errorHandler(res.data);
		});
	},
	jobApply(params) {
		return axios.post(`${prefix}/api/zsapi/recruitmentapply/submit?ticket=${ticket}`, params).catch(res =>{
			errorHandler(res.data);
		});
	}
}